package com.hoshiicloud.stock.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.hoshiicloud.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 库存单明细表实体
 *
 * @author : yangcheng
 * @date : 2019/5/17 11:49
 * @mail : maiboyc@163.com
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Wvoucherd implements Serializable {

    private static final long serialVersionUID = 3347511806422268364L;

    private Long id;

    // 库存单ID
    @NotNull(message = "库存单ID不能为空")
    @ApiModelProperty(name = "parentid", value = "库存单ID", required = true, dataType = "java.lang.Long", example = "3171776001692663890")
    private Long parentid;

    // SKUID
    @NotNull(message = "SKUID不能为空")
    @ApiModelProperty(name = "skuid", value = "SKUID", required = true, dataType = "java.lang.Long", example = "3171776001692663891")
    private Long skuid;

    // SKUNO
    @NotNull(message = "SKUNO不能为空")
    @ApiModelProperty(name = "skuno", value = "SKUNO", required = true, dataType = "java.lang.String", example = "SKU0001")
    private String skuno;

    // 商品名称
    @NotNull(message = "商品名称不能为空")
    @ApiModelProperty(name = "skuname", value = "商品名称", required = true, dataType = "java.lang.String", example = "女士衬衫")
    private String skuname;

    // 规格
    @NotNull(message = "规格不能为空")
    @ApiModelProperty(name = "spec", value = "规格", required = true, dataType = "java.lang.String", example = "件")
    private String spec;

    // 单位
    @NotNull(message = "单位不能为空")
    @ApiModelProperty(name = "unit", value = "单位", required = true, dataType = "java.lang.String", example = "件")
    private String unit;

    // 单价
    @NotNull(message = "单价不能为空")
    @ApiModelProperty(name = "unitprice", value = "单价", required = true, dataType = "java.math.BigDecimal", example = "89.00")
    private BigDecimal unitprice;

    // 数量
    @NotNull(message = "数量不能为空")
    @ApiModelProperty(name = "quantity", value = "数量", required = true, dataType = "java.math.BigDecimal", example = "100.00")
    private BigDecimal quantity;

    // 金额
    @NotNull(message = "金额不能为空")
    @ApiModelProperty(name = "amount", value = "金额", required = true, dataType = "java.math.BigDecimal", example = "8900")
    private BigDecimal amount;

    // 参考仓库
    @ApiModelProperty(name = "refwhcode", value = "参考仓库", dataType = "java.lang.String", example = "WH0002")
    private String refwhcode;

    // 备注
    @ApiModelProperty(name = "remark", value = "备注", required = true, dataType = "java.lang.String", example = "备注信息")
    private String remark;

    @ApiModelProperty(value = "是否删除", hidden = true)
    private Integer deleted;

    @TableField("createdtime")
    @ApiModelProperty(name = "createdTime", value = "创建时间", required = true, dataType = "java.util.Date", example = "2019-05-04 10:08:35", hidden = true)
    private LocalDateTime createdTime;

    @TableField("createdby")
    @ApiModelProperty(name = "createdBy", value = "创建人", required = true, dataType = "java.lang.String", example = "admin", hidden = true)
    private String createdBy;

    @TableField("updatedtime")
    @ApiModelProperty(value = "修改时间", hidden = true)
    private LocalDateTime updatedTime;

    @TableField("updateby")
    @ApiModelProperty(value = "修改人", hidden = true)
    private String updatedBy;
    @ApiModelProperty(name = "code", value = "商品编码")
    private String code;
    @TableField("barcode")
    @ApiModelProperty(name = "barCode", value = "商品条码")
    private String barCode;
    @TableField("packetcode")
    @ApiModelProperty(name = "packetCode", value = "箱码")
    private String packetCode;
    @ApiModelProperty(name = "innerBoxs", value = "内件数")
    private Long innerBoxs;
    @ApiModelProperty(name = "vendorId", value = "所属供应商")
    private Long vendorId;

    @ApiModelProperty(name = "taxUnitprice", value = "单价（含税）", dataType = "java.math.BigDecimal", example = "89.00")
    private BigDecimal taxUnitprice;

    @ApiModelProperty(name = "totAmount", value = "金额 （含税） = 金额（不含税） + 税额", dataType = "java.math.BigDecimal", example = "89.00")
    private BigDecimal totAmount;
    @ApiModelProperty(name = "taxRate", value = "税率", dataType = "java.math.BigDecimal", example = "89.00")
    private BigDecimal taxRate;
    @ApiModelProperty(name = "taxAmount", value = "税额", dataType = "java.math.BigDecimal", example = "89.00")
    private BigDecimal taxAmount;


}